import request from '@/utils/request'
import upload from '@/utils/upload'

// 查询库存列表
export function stockList(query) {
	return request({
		url: '/system/app/stock/list',
		method: 'GET',
		params: query
	})
}

// 根据库存明细
export function stockListDetail(data) {
	return request({
		url: '/system/app/stock/list/detail' ,
		method: 'POST',
		data: data
	})
}


// 库存更新
export function addStock(data) {
	return request({
		url: '/system/app/stock/add' ,
		method: 'POST',
		data: data
	})
}


//更新系列主图
export function updateItemImg(data) {
	return request({
		url: '/system/app/updateItemImg',
		method: 'post',
		data: data
	})
}

// 图片上传
export function uploadImg(data) {
  return upload({
    url: '/system/profile/upload',
    name: data.name,
    filePath: data.filePath
  })
}

//更新skuCode
export function updateSkuCode(data) {
	return request({
		url: '/system/app/updateSkuCode',
		method: 'post',
		data: data
	})
}